/*
 * Copyright: Tianjin Berheley Tech Co,.ltd, China
 * biPlatform
 * com.berheley.bi.util -> StringUtil.java
 * Created on 2010-1-14-下午02:52:02
 */
package com.webframe.util;

/**
 * 类功能描述：
 *
 * @author lenovo
 * Create:      2010-1-14 下午02:52:02
 * Description: 
 */
public class StringUtil
{

	public static String replaceSpecilCharForJson(String sb)
	{
		
		return sb.replaceAll("\\\\", "\\\\\\\\").replaceAll("\"", "\\\\\"").replaceAll("\'", "\\\\\'");
	}
	public static String replaceSpecilCharForJson(Object obj)
	{
		if(obj==null)
			return "";
		else
			return replaceSpecilCharForJson(obj.toString());
	}
}
